/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#ifndef _PQ_Boids_H_
#define _PQ_Boids_H_

#include "SceneObject.h"
#include "Boid.h"

namespace PQClient
{
	/*Fish group gather all the same fish together.
	*/
	class Boids
	{
	public:
		const unsigned int NUM_FISH;
		const unsigned int NUM_FISH_WAYPOINTS;
		const unsigned int FISH_PATH_LENGTH;
		

		Boids(PQEngine::SceneObject* sceneObject,Ogre::String fishName,Ogre::String meshName);
		~Boids();
		
		
		void update(float deltaT);
	protected:
		void keepOnGround(int i);
		void createBoidsMeshes();
	protected:
		Ogre::String _boidsName;
		Ogre::String _meshName;

		PQEngine::SceneObject* _sceneObject;

		Ogre::RaySceneQuery* _rayQuery;

		Ogre::Real _animTime;

		std::vector<Boid*> _boids;
		Boid* _boidList;
		std::vector<Ogre::SimpleSpline> _pathSplines;
	};

}

#endif
